chore(tests): add Opensearch integration tests#24652
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
a298c6d to
22f4c6a
Compare
22f4c6a to
1fb22c7
Compare
|
Rebased against master. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1fb22c7764
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
191e6ae to
fd50c2f
Compare
|
Hi @ts-ppi-1, please fix the merge conflicts and we will take another look at the PR. Thanks! |
fd50c2f to
b5555a4
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b5555a40ce
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Looks like an editor autoformatted some YAML files in a recent commit. I have rebased the changes to the new formatting. |
7a9fd98 to
73aa987
Compare
|
Rebased the branch and rebuilt the certificates because the azurite integration test also added new certificates with the same serial number. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 73aa987cb6
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| @@ -0,0 +1,21 @@ | |||
| features: | |||
| - es-integration-tests | |||
There was a problem hiding this comment.
| - es-integration-tests |
There was a problem hiding this comment.
This is needed because the integration tests are the es-integration-tests running against an opensearch instance instead of an elasticsearch instance
| } | ||
|
|
||
| #[cfg(feature = "aws-core")] | ||
| #[cfg_attr(feature = "opensearch-integration-tests", ignore)] |
There was a problem hiding this comment.
Here and below:
| #[cfg_attr(feature = "opensearch-integration-tests", ignore)] |
There was a problem hiding this comment.
Opensearch is missing the AWS authentication so this test has to be skipped
| ElasticsearchMode::DataStream => config | ||
| .data_stream | ||
| .as_ref() | ||
| .map(|ds| format!("logs-generic-{}", ds.namespace)) |
There was a problem hiding this comment.
If we write here eventually, can we delete my-template-* / my-stream-* ?
There was a problem hiding this comment.
I'd have to look into this. As of now, this is the smallest change I found back then that worked against both backends
| /// Use the Elasticsearch 8.x API. | ||
| V8, | ||
| /// Use the Opensearch 3.x API | ||
| OS3, |
There was a problem hiding this comment.
This basically V7 so I think we can delete this and just update the V7 docs.
There was a problem hiding this comment.
At the moment, the OS3 code paths are the same as V7, but there it lays the groundwork to handle all minor differences (current and upcoming) and new functionality that does not warrant an entirely new sink.
| let mut body = body.collect().await?.aggregate(); | ||
| let body = body.copy_to_bytes(body.remaining()); | ||
| let ResponsePayload { version } = serde_json::from_slice(&body)?; | ||
| if let Some(version) = version.as_ref() |
There was a problem hiding this comment.
If we do this https://github.com/vectordotdev/vector/pull/24652/changes#r3073522268, then we can delete all changes in this file.
There was a problem hiding this comment.
Theoretically yes, but once we need special handling of Opensearch that does not yet warrant a separate sink we should have the groundwork ready.
73aa987 to
3fa995b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3fa995b816
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
3fa995b to
961f106
Compare
961f106 to
7054892
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7054892205
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| data_stream: Some(DataStreamConfig { | ||
| namespace: index, | ||
| ..Default::default() |
There was a problem hiding this comment.
Align the data stream name with the test setup
When the new OpenSearch suite runs insert_events_in_data_stream, this data_stream config makes the sink derive the target as logs-generic-{index}, while the setup just above still creates an index template matching my-*-* and a data stream named my-stream-{index}. OpenSearch data streams need a matching data-stream index template for the target name, so the bulk writes go to an unprepared logs-generic-* stream and the test fails instead of exercising the created stream.
Useful? React with 👍 / 👎.
b2ee261 to
5d0adb2
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5d0adb2cd9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
2892e6f to
abd8ecf
Compare
|
Rebased against master |
Summary
This PR adjusts the existing Elasticsearch integration test to also run the test against Opensearch 3.5.
As a very minor change it changes the automatic Elasticsearch version detection to detect Opensearch as version 7.
Change Type
Is this a breaking change?
Does this PR include user facing changes?
Overriding the Elasticsearch version to 7 is not needed any more for Opensearch.
no-changeloglabel to this PR.References
Related: #17690 , #16761